<%@ page import="com.yinhai.core.common.api.config.impl.SysConfig"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<jsp:directive.page import="java.util.Date" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<%@ taglib prefix="ta" tagdir="/WEB-INF/tags/tatags"%>

<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%">
<head>
<title>电子邮件配置</title>
</head>
<%@ include file="/ta/inc.jsp"%>
<body >
	<ta:pageloading />
	<ta:box minWidth="1000" fit="true" cssStyle="margin-top:5px">
		<ta:panel id="pnlSmsQry" key="查询条件" cols="3" >
			<ta:text id="qry_SmsPlatform" key="平台名称" />
			<ta:buttonLayout>
				<ta:button id="smsQry" isok="true" key="查询" onClick="fnQuerySms()" />
				<ta:button id="smsClear" key="清空" onClick="fnClear()" />
			</ta:buttonLayout>
		</ta:panel>
		<ta:panel id="platform" key="平台" withToolBar="true" fit="true" columnWidth="0.25">
			<ta:panelToolBar>
				<ta:button id="btnAddSms" key="新增[A]" hotKey="a" icon="icon-add" isShowIcon="true" asToolBarItem="true" onClick="fnAddSms()" />
			</ta:panelToolBar>
			<ta:datagrid id="smsgrid" fit="true" haveSn="true" clickActiveStyle="true" forceFitColumns="true" columnFilter="true" >
				<ta:datagridItem id="platformName" key="平台名称" sortable="true"/>
				<ta:datagridItem id="defaultPlatform" key="默认平台" sortable="true"/>
				<ta:datagridItem id="serverIp" key="服务器ip地址" sortable="true" />
				<ta:datagridItem id="serverPort" key="端口" sortable="true"/>
				<ta:datagridItem id="mainAccount" key="账号" sortable="true"/>
				<ta:datagridItem id="appName" key="应用名称" sortable="true"/>
				<ta:datagridItemOperate id="a" showAll="false" name="操作">
					<ta:datagridItemOperateMenu icon="a" name="编辑" click="fnUpdateSms" />
					<ta:datagridItemOperateMenu icon="a" name="修改密码" click="fnUpdatePasswordSms" />
					<ta:datagridItemOperateMenu icon="a" name="删除" click="fnDeleteSms" />
				</ta:datagridItemOperate>
			</ta:datagrid>
		</ta:panel>
	</ta:box>
</body>
</html>
<script type="text/javascript">
	
	$(document).ready(function() {
		$("body").taLayout();
	});
	
	/*查询短信平台 */
	function fnQuerySms(){
		Base.submit("qry_SmsPlatform","SmsConfigController!queryAllSmsConfig.do");
	}
	
	/* 新增短信平台 */
	function fnAddSms(){
		Base.openWindow("addconfigsms","添加短信平台","SmsConfigController!toAddSmsConfig.do",null, 500, 410,  null,null,true);
	}
	
	/*编辑短信平台*/
	function fnUpdateSms(r){
		Base.openWindow("editconfigsms","编辑短信平台","SmsConfigController!toEditSmsConfig.do",{"dto['platformName']":r.platformName}, 500, 360,  null,null,true);
	}
	
	function fnUpdatePasswordSms(){
		
	}
	
	function fnDeleteSms(r){
		Base.confirm("确定删除此平台吗?",function(yes){
			if(yes){
				Base.submit("","SmsConfigController!deleteSmsPlatform.do",{"dto['platformName']":r.platformName},null,null,function(){
					Base.msgTopTip("删除成功!");
				});
			}
		}); 
	}
</script>
<%@ include file="/ta/incfooter.jsp"%>